<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSpy v2011 (http://www.altova.com) by Kalle Launiala (Citrus Solutions Oy) -->
<xs:schema xmlns="http://tempuri.org/OOP_v1_0.xsd" xmlns:mstns="http://tempuri.org/OOP_v1_0.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempuri.org/OOP_v1_0.xsd" elementFormDefault="qualified" id="OOP_v1_0">
	<xs:element name="OOPAbstraction">
		<xs:annotation>
			<xs:documentation>This abstraction defines object-oriented programming model "class" structure.

The abstraction provides traditional "inheritance" in form of categories.

Categories are a form of "multiple-inheritance" in more category-specific controlled way.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="ObjectTypes" maxOccurs="unbounded">
					<xs:annotation>
						<xs:documentation>Traditional OOP "classes"</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ObjectType" maxOccurs="unbounded">
								<xs:annotation>
									<xs:documentation>Traditional OOP "class"</xs:documentation>
								</xs:annotation>
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="Category" minOccurs="0">
											<xs:annotation>
												<xs:documentation>Implicit category, when this object does not use "inheritance" referring categories.</xs:documentation>
											</xs:annotation>
										</xs:element>
										<xs:element name="CategoryLink" minOccurs="0" maxOccurs="unbounded">
											<xs:complexType>
												<xs:attribute name="categoryName" type="xs:string" use="required"/>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
									<xs:attribute name="name" type="xs:string" use="required">
										<xs:annotation>
											<xs:documentation>Class's name.</xs:documentation>
										</xs:annotation>
									</xs:attribute>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attribute name="namespaceName" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation>Namespace for target classes.</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
				<xs:element name="Categories" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Traditional OOP "base classes" for multiple-inheritance.</xs:documentation>
					</xs:annotation>
					<xs:complexType>
						<xs:sequence>
							<xs:element ref="Category" maxOccurs="unbounded"/>
						</xs:sequence>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
		<xs:keyref name="fkReferenceType" refer="objectName">
			<xs:selector xpath="Categories/Category/CategoryData/Field"/>
			<xs:field xpath="@referenceType"/>
		</xs:keyref>
		<xs:key name="objectName">
			<xs:selector xpath="ObjectTypes/ObjectType"/>
			<xs:field xpath="@name"/>
		</xs:key>
		<xs:key name="categoryName">
			<xs:selector xpath="Categories/Category"/>
			<xs:field xpath="@name"/>
		</xs:key>
		<xs:keyref name="fkCategoryLink" refer="categoryName">
			<xs:selector xpath="ObjectTypes/ObjectType/CategoryLink"/>
			<xs:field xpath="@categoryName"/>
		</xs:keyref>
	</xs:element>
	<xs:element name="CategoryData">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Field" minOccurs="0" maxOccurs="unbounded">
					<xs:complexType>
						<xs:attribute name="name" type="xs:string" use="required">
							<xs:annotation>
								<xs:documentation>Field name. 

This is generated as property on most of the languages, but can also be used as public field.</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="logicalType" use="required">
							<xs:annotation>
								<xs:documentation>Logical datatype.

If the type is set as "objectReference", the referenceType attribute must contain the reference type name.

If the type is set as "absoluteType" the absoluteType attribute must contain the absolute type that is generated.

The absolute type is generated as-is, so it may contain platform specific types.</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:enumeration value="integer32"/>
									<xs:enumeration value="integer64"/>
									<xs:enumeration value="double64"/>
									<xs:enumeration value="decimal128"/>
									<xs:enumeration value="stringUnicode"/>
									<xs:enumeration value="date"/>
									<xs:enumeration value="dateTime"/>
									<xs:enumeration value="time"/>
									<xs:enumeration value="objectReference"/>
									<xs:enumeration value="absoluteType"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="referenceType" type="xs:string">
							<xs:annotation>
								<xs:documentation>(Opt: required when logicalType = objectReference)

Contains the referenceType defined within the same OOP abstraction.</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="absoluteType" type="xs:string">
							<xs:annotation>
								<xs:documentation>(Opt: required when logicalType = absoluteType)

Contains the absolute type for generated field or property.

This type is used when defining platform-specific types that are not included in supported logical types.</xs:documentation>
							</xs:annotation>
						</xs:attribute>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="CategoryBehavior"/>
	<xs:element name="Category">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="CategoryData"/>
				<xs:element ref="CategoryBehavior"/>
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" use="required">
				<xs:annotation>
					<xs:documentation>Category name.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
</xs:schema>
